package com.runtime.hongyunmanage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.runtime.hongyunmanage.domain.Message;
import com.runtime.hongyunmanage.domain.vo.OrdersVo;
import com.runtime.hongyunmanage.mapper.OrdersMapper;
import com.runtime.hongyunmanage.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class OrdersServiceimpl extends ServiceImpl<OrdersMapper, OrdersVo> implements OrdersService {
    @Autowired
    private OrdersMapper ordersMapper;

    @Override
    public List<OrdersVo> selectOrder(int current,int size) {
        return ordersMapper.selectOrder(current,size);
    }

    @Override
    public int selectone(String createdAt,String endAt ,String username, String status) {
        return ordersMapper.selectone(createdAt, endAt,username, status);
    }

    @Override
    public List<OrdersVo> selectroleuserAcc(String createdAt,String endAt ,String username, String status, int current, int size) {
        return ordersMapper.selectroleuserAcc(createdAt, endAt,username, status, current, size);
    }

    @Override
    public Integer MessageCount() {
        return ordersMapper.MessageCount();
    }

    @Override
    public List<Message> selectMessage(int current, int size) {
        return ordersMapper.selectMessage(current,size);
    }

    @Override
    public Integer totalMessage() {
        return ordersMapper.totalMessage();
    }

    @Override
    public Integer updateStatue(Integer messageId) {
        return ordersMapper.updateStatue(messageId);
    }

    @Override
    public Integer deleteMessage(Integer messageId) {
        return ordersMapper.deleteMessage(messageId);
    }

    @Override
    public Integer markAll(Integer param) {
        return ordersMapper.markAll(param);
    }

    @Override
    public boolean confirmShipment(Integer orderId, String trackingNumber, String courierCompany) {
        return ordersMapper.confirmShipment(orderId,trackingNumber,courierCompany);
    }
}
